package weibo4j.examples.timeline;

import weibo4j.Timeline;
import weibo4j.examples.Constants;
import weibo4j.examples.oauth2.Log;
import weibo4j.model.Status;
import weibo4j.model.WeiboException;

public class UpdateStatus {
	/**
	 * 错误码参考：http://open.weibo.com/wiki/Error_code
	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		String access_token = Constants.access_token;
		String statuses = "此条微博来自测发布";
		Timeline tm = new Timeline();
		tm.client.setToken(access_token);
		try {
			Status status = tm.UpdateStatus(statuses);

			Log.logInfo(status.toString());
		} catch (WeiboException e) {
			e.printStackTrace();
		}
	}

}
